package com.dao;

import com.service.EmpService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {

        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        String name = context.getBean("empService", EmpService.class).getNameById(2);
        System.out.println(name);

    }
}
